package main

import "fmt"

func fastSort(data *[11]int, start int, end int){
	if start >= end {
		return
	}
	low := start
	high := end
	stand := data[start]
	for low < high{
		for data[high] > stand && low<high {
			high--
		}
		data[low] = data[high]
		for data[low] < stand  && low<high {
			low++
		}
		data[high] = data[low]
	}
	data[low] = stand
	fastSort(data, start, low)
	fastSort(data, low+1, end)
}

func main(){
	var arr = [11]int{4,8,1,0,9,5,2,3,7,6,10}
	fastSort(&arr, 0, 9)

	for i := range arr {
		fmt.Println(arr[i])
	}
}

